package com.teame.readbaby.parser;

import java.util.List;

import org.json.JSONException;

import com.alibaba.fastjson.JSONObject;
import com.teame.readbaby.vo.FavProduct;

public class FavProductParser extends BaseParser<List<FavProduct>> {

	@Override
	public List<FavProduct> parseJSON(String paramString) throws JSONException {
		String result = checkResponse(paramString);
		if (result == null) {
			return null;
		}
		
		JSONObject jsonObject = JSONObject.parseObject(paramString);
		String jsonFavProductList = jsonObject.getString("productlist");

		List<FavProduct> favProductList = JSONObject.parseArray(jsonFavProductList, FavProduct.class);
		return favProductList;
		
	}

}
